Integrand size = 28, antiderivative size = 72 \[ \int \sec ^3(c+d x) (a \cos (c+d x)+b \sin (c+d x))^3 \, dx=a \left (a^2-3 b^2\right ) x-\frac {b \left (3 a^2-b^2\right ) \log (\cos (c+d x))}{d}+\frac {2 a b^2 \tan (c+d x)}{d}+\frac {b (a+b \tan (c+d x))^2}{2 d} \]
[Out]
Time = 0.11 (sec) , antiderivative size = 72, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.143, Rules used = {3165, 3563, 3606, 3556} \[ \int \sec ^3(c+d x) (a \cos (c+d x)+b \sin (c+d x))^3 \, dx=-\frac {b \left (3 a^2-b^2\right ) \log (\cos (c+d x))}{d}+a x \left (a^2-3 b^2\right )+\frac {2 a b^2 \tan (c+d x)}{d}+\frac {b (a+b \tan (c+d x))^2}{2 d} \]
[In]
[Out]
Rule 3165
Rule 3556
Rule 3563
Rule 3606
Rubi steps \begin{align*} \text {integral}& = \int (a+b \tan (c+d x))^3 \, dx \\ & = \frac {b (a+b \tan (c+d x))^2}{2 d}+\int (a+b \tan (c+d x)) \left (a^2-b^2+2 a b \tan (c+d x)\right ) \, dx \\ & = a \left (a^2-3 b^2\right ) x+\frac {2 a b^2 \tan (c+d x)}{d}+\frac {b (a+b \tan (c+d x))^2}{2 d}+\left (b \left (3 a^2-b^2\right )\right ) \int \tan (c+d x) \, dx \\ & = a \left (a^2-3 b^2\right ) x-\frac {b \left (3 a^2-b^2\right ) \log (\cos (c+d x))}{d}+\frac {2 a b^2 \tan (c+d x)}{d}+\frac {b (a+b \tan (c+d x))^2}{2 d} \\ \end{align*}
Result contains complex when optimal does not.
Time = 0.24 (sec) , antiderivative size = 79, normalized size of antiderivative = 1.10 \[ \int \sec ^3(c+d x) (a \cos (c+d x)+b \sin (c+d x))^3 \, dx=\frac {(i a-b)^3 \log (i-\tan (c+d x))-(i a+b)^3 \log (i+\tan (c+d x))+6 a b^2 \tan (c+d x)+b^3 \tan ^2(c+d x)}{2 d} \]
[In]
[Out]
Time = 1.08 (sec) , antiderivative size = 70, normalized size of antiderivative = 0.97
method | result | size |
derivativedivides | \(\frac {a^{3} \left (d x +c \right )-3 a^{2} b \ln \left (\cos \left (d x +c \right )\right )+3 a \,b^{2} \left (\tan \left (d x +c \right )-d x -c \right )+b^{3} \left (\frac {\tan \left (d x +c \right )^{2}}{2}+\ln \left (\cos \left (d x +c \right )\right )\right )}{d}\) | \(70\) |
default | \(\frac {a^{3} \left (d x +c \right )-3 a^{2} b \ln \left (\cos \left (d x +c \right )\right )+3 a \,b^{2} \left (\tan \left (d x +c \right )-d x -c \right )+b^{3} \left (\frac {\tan \left (d x +c \right )^{2}}{2}+\ln \left (\cos \left (d x +c \right )\right )\right )}{d}\) | \(70\) |
parts | \(\frac {a^{3} \left (d x +c \right )}{d}+\frac {b^{3} \left (\frac {\tan \left (d x +c \right )^{2}}{2}+\ln \left (\cos \left (d x +c \right )\right )\right )}{d}+\frac {3 a \,b^{2} \left (\tan \left (d x +c \right )-d x -c \right )}{d}+\frac {3 a^{2} b \ln \left (\sec \left (d x +c \right )\right )}{d}\) | \(78\) |
risch | \(3 i a^{2} b x -i x \,b^{3}+a^{3} x -3 a \,b^{2} x +\frac {6 i b \,a^{2} c}{d}-\frac {2 i b^{3} c}{d}+\frac {2 b^{2} \left (3 i a \,{\mathrm e}^{2 i \left (d x +c \right )}+b \,{\mathrm e}^{2 i \left (d x +c \right )}+3 i a \right )}{d \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )^{2}}-\frac {3 b \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right ) a^{2}}{d}+\frac {b^{3} \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )}{d}\) | \(140\) |
parallelrisch | \(\frac {6 b \left (1+\cos \left (2 d x +2 c \right )\right ) \left (a^{2}-\frac {b^{2}}{3}\right ) \ln \left (\sec \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}\right )-6 b \left (1+\cos \left (2 d x +2 c \right )\right ) \left (a^{2}-\frac {b^{2}}{3}\right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )-6 b \left (1+\cos \left (2 d x +2 c \right )\right ) \left (a^{2}-\frac {b^{2}}{3}\right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )+\left (2 a^{3} x d -6 a \,b^{2} d x -b^{3}\right ) \cos \left (2 d x +2 c \right )+2 a^{3} x d -6 a \,b^{2} d x +6 \sin \left (2 d x +2 c \right ) a \,b^{2}+b^{3}}{2 d \left (1+\cos \left (2 d x +2 c \right )\right )}\) | \(189\) |
norman | \(\frac {\left (a^{3}-3 a \,b^{2}\right ) x +\left (-2 a^{3}+6 a \,b^{2}\right ) x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{4}+\left (-2 a^{3}+6 a \,b^{2}\right ) x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{6}+\left (a^{3}-3 a \,b^{2}\right ) x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}+\left (a^{3}-3 a \,b^{2}\right ) x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{8}+\left (a^{3}-3 a \,b^{2}\right ) x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{10}-\frac {2 b^{3}}{d}-\frac {2 b^{3} \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{10}}{d}+\frac {10 b^{3} \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{4}}{d}+\frac {10 b^{3} \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{6}}{d}+\frac {6 a \,b^{2} \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{d}+\frac {12 a \,b^{2} \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}}{d}-\frac {12 a \,b^{2} \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{7}}{d}-\frac {6 a \,b^{2} \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{9}}{d}}{\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}-1\right )^{2} \left (1+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}\right )^{3}}+\frac {b \left (3 a^{2}-b^{2}\right ) \ln \left (1+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}\right )}{d}-\frac {b \left (3 a^{2}-b^{2}\right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}{d}-\frac {b \left (3 a^{2}-b^{2}\right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{d}\) | \(396\) |
[In]
[Out]
none
Time = 0.26 (sec) , antiderivative size = 88, normalized size of antiderivative = 1.22 \[ \int \sec ^3(c+d x) (a \cos (c+d x)+b \sin (c+d x))^3 \, dx=\frac {2 \, {\left (a^{3} - 3 \, a b^{2}\right )} d x \cos \left (d x + c\right )^{2} + 6 \, a b^{2} \cos \left (d x + c\right ) \sin \left (d x + c\right ) - 2 \, {\left (3 \, a^{2} b - b^{3}\right )} \cos \left (d x + c\right )^{2} \log \left (-\cos \left (d x + c\right )\right ) + b^{3}}{2 \, d \cos \left (d x + c\right )^{2}} \]
[In]
[Out]
\[ \int \sec ^3(c+d x) (a \cos (c+d x)+b \sin (c+d x))^3 \, dx=\int \left (a \cos {\left (c + d x \right )} + b \sin {\left (c + d x \right )}\right )^{3} \sec ^{3}{\left (c + d x \right )}\, dx \]
[In]
[Out]
none
Time = 0.31 (sec) , antiderivative size = 85, normalized size of antiderivative = 1.18 \[ \int \sec ^3(c+d x) (a \cos (c+d x)+b \sin (c+d x))^3 \, dx=\frac {2 \, {\left (d x + c\right )} a^{3} - 6 \, {\left (d x + c - \tan \left (d x + c\right )\right )} a b^{2} - b^{3} {\left (\frac {1}{\sin \left (d x + c\right )^{2} - 1} - \log \left (\sin \left (d x + c\right )^{2} - 1\right )\right )} - 3 \, a^{2} b \log \left (-\sin \left (d x + c\right )^{2} + 1\right )}{2 \, d} \]
[In]
[Out]
none
Time = 0.35 (sec) , antiderivative size = 71, normalized size of antiderivative = 0.99 \[ \int \sec ^3(c+d x) (a \cos (c+d x)+b \sin (c+d x))^3 \, dx=\frac {b^{3} \tan \left (d x + c\right )^{2} + 6 \, a b^{2} \tan \left (d x + c\right ) + 2 \, {\left (a^{3} - 3 \, a b^{2}\right )} {\left (d x + c\right )} + {\left (3 \, a^{2} b - b^{3}\right )} \log \left (\tan \left (d x + c\right )^{2} + 1\right )}{2 \, d} \]
[In]
[Out]
Time = 23.58 (sec) , antiderivative size = 183, normalized size of antiderivative = 2.54 \[ \int \sec ^3(c+d x) (a \cos (c+d x)+b \sin (c+d x))^3 \, dx=\frac {2\,\left (\frac {b^3\,\ln \left (\frac {\cos \left (c+d\,x\right )}{\cos \left (c+d\,x\right )+1}\right )}{2}-\frac {b^3\,\ln \left (\frac {1}{{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2}\right )}{2}+a^3\,\mathrm {atan}\left (\frac {\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}\right )+\frac {3\,a^2\,b\,\ln \left (\frac {1}{{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2}\right )}{2}-3\,a\,b^2\,\mathrm {atan}\left (\frac {\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}\right )-\frac {3\,a^2\,b\,\ln \left (\frac {\cos \left (c+d\,x\right )}{\cos \left (c+d\,x\right )+1}\right )}{2}\right )}{d}+\frac {\frac {b^3}{2}+\frac {3\,a\,\sin \left (2\,c+2\,d\,x\right )\,b^2}{2}}{d\,\left (\frac {\cos \left (2\,c+2\,d\,x\right )}{2}+\frac {1}{2}\right )} \]
[In]
[Out]